package com.songshu.sb.service.impl;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Slf4j
@Service
public class JdbcTemplateTestServiceImpl {

    @Autowired
    private JdbcTemplate jdbcTemplate;

    public List<Map<String, Object>> querySysUser(){
        String sql = "select * from sys_user";
        List<Map<String, Object>> maps = jdbcTemplate.queryForList(sql);
        log.info("map.size(): {}", maps.size());
        return maps;
    }
}
